package acm.蓝桥5;

import java.util.Scanner;

public class 打印题 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int total = 4 * (n - 1);
        StringBuilder builder = new StringBuilder();
        int cur = 1;
        while (builder.length() < total) {
            builder.append(cur++);
        }
        String str = builder.substring(0, total);
        int h = 0, t = str.length() - 1;
        for (int i = 1; i < n; i++) {
            System.out.printf(".");
        }
        System.out.println(str.charAt(h++));    //第一层
        for (int i = 1; i < n - 1; i++) {
            for (int j = i+1; j < n; j++) {   //左侧空格
                System.out.printf(".");
            }
            System.out.printf("%c",str.charAt(h++));

            for (int j = 0; j < 2*i-1; j++) {   //中间空格
                System.out.printf(".");
            }

            System.out.println(str.charAt(t--));    //尾巴
        }
        while (h<=t){
            System.out.printf("%c",str.charAt(h++));
        }
        System.out.println();
    }
}
